﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Microsoft.VisualStudio.TestPlatform.CommunicationUtilities.ObjectModel;

namespace BakeryInventoryTesting
{
    public class BakeryItem
    {
        private string _name;

        public string Name
        {
            get { return _name; }
            set {
                if (string.IsNullOrWhiteSpace(value))
                {
                    throw new ArgumentNullException("Name");
                }
                _name = value;
            }
        }

        public decimal Price { get; set; }
        public decimal Quantity { get; set; }
        public DateTime ExpirationDate { get; set; }
        public bool IsExpired()
        {
           
            return DateTime.Now > ExpirationDate;
        }
    }
}
